<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
      <el-form-item label="发行人" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入发行人名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="股票编号" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入股票编号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
              <el-button
                type="primary"
                plain
                icon="el-icon-plus"
                size="mini"
                @click="handleAdd"
                v-hasPermi="['operate:stock:add']"
              >新增关注</el-button>
            </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table :data="tableData">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="股票编号" align="center" prop="name" />
      <el-table-column label="发行人" align="center" prop="type" />
      <el-table-column label="开盘价格" align="center" prop="cardType" />
      <el-table-column label="昨日收盘价" align="center" prop="card" />
      <el-table-column label="最新价格" align="center" prop="customerManager" />
      <el-table-column label="总成交数" align="right" prop="department" />
      <el-table-column label="总成交金额" align="right" prop="changefangshi" />
      <el-table-column label="可投资股票数量" align="center" prop="bbb" />
      <el-table-column align="center" class-name="small-padding fixed-width" label="操作">
        <template slot-scope="scope">
          <el-button
            v-hasPermi="['invest:stockApply:edit']"
            type="text"
            @click="handleUpdate(scope.row)"
          >取消关注
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    name: "Client",
    data() {
      return {
        tableData: [{
          name: '16298750',
          type: '孙茂罡',
          cardType: '35.60',
          card: '46.82',
          customerManager: '47.23',
          department: '152',
          changefangshi: '1584.48',
          bbb: '64',
        }, {
          name: '84254106',
          type: '王守明',
          cardType: '28.46',
          card: '37.87',
          customerManager: '35.74',
          department: '278',
          changefangshi: '2622.85',
          bbb: '112',
        }, {
          name: '75633068',
          type: 'zhan',
          cardType: '35.60',
          card: '46.82',
          customerManager: '47.23',
          department: '152',
          changefangshi: '1584.48',
          bbb: '64',
        }, {
          name: '16298750',
          type: '孙茂罡',
          cardType: '35.60',
          card: '46.82',
          customerManager: '47.23',
          department: '152',
          changefangshi: '1584.48',
          bbb: '64',
        }],
        // 遮罩层
        loading: true,
        // 导出遮罩层
        exportLoading: false,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 客户维护表格数据
        clientList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          name: null,
          type: null,
          cardType: null,
          card: null,
          customerManager: null,
          department: null,
        },
        // 表单参数
        form: {},
        // 表单校验
        rules: {
        }
      };
    },
  };
</script>


